package ${commonPackage}.entity.${tablePrefix};

import com.mybatisflex.annotation.Table;
<#if entityBase = true>
import com.liliudong.template.common.entity.BaseEntity;
import lombok.EqualsAndHashCode;
</#if>
import lombok.Data;

/**
 * ${tableComment}
 *
 * @author ${username}
 * @date ${createTime}
 */
<#if  entityBase = true>
@EqualsAndHashCode(callSuper = true)
</#if>
@Data
@Table("${tableName}")
public class ${entityName} <#if  entityBase = true>extends BaseEntity </#if>{
<#assign entityBaseColumns = ["id", "created_at", "created_by", "created_from", "updated_at", "updated_by", "deleted"]>
<#list columns as column>
<#if entityBase = false || (entityBase = true && !entityBaseColumns?seq_contains(column.columnName))>
	/**
	 * ${column.columnComment}
	 */
<#if column.isPrimaryKey() = true>
	<#if column.isAutoIncrement() = true>
    @Id(keyType = KeyType.Auto)
	<#else>
    @Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
	</#if>
<#else>
</#if>
    private ${column.javaType} ${column.columnNameCamel};
</#if>
</#list>
}